import { createApp } from 'vue'
import router from './router'
import store from './store'
const app = createApp(App)

// 引入重置样式
import "./assets/css/reset.css"

// 引入 iconfont 图标
import './assets/fonts/iconfont.css'

// 引入公共组件
import { registerComponents } from './components'
registerComponents(app);

// UI框架
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'

// 全局注册图标
import * as Icons from '@element-plus/icons-vue'
for (let iconName in Icons) {
    app.component(iconName, Icons[iconName])
}

// 引入插件和语言包
import I18n from './language'

/* 数据交互
    安装、配置代理、封装 */

app.use(I18n).use(ElementPlus).use(store).use(router).mount('#app')